using System.Collections;
using UnityEngine;
using VoxelEngine.TerrainGenerator;
using VoxelEngine.Utils;

namespace VoxelEngine
{
	public class TerrainGeneratorController : MonoBehaviour
	{
		[SerializeField]
		protected string _worldId;

		[SerializeField]
		protected Vector3i _worldSize;

		[SerializeField]
		protected VoxelEngine.TerrainGenerator.TerrainGenerator _terrainGenerator;

		private IEnumerator Start()
		{
			World world = new World(_worldId, null, _worldSize);
			yield return StartCoroutine(_terrainGenerator.CreateWorldFromSeed(world));
			world.SaveSync();
		}
	}
}
